//
//  CollectionTableViewCell.m
//  NewMyMusicAPP
//
//  Created by 11_wyq on 15/7/3.
//  Copyright (c) 2015年 lanou3g.com 蓝鸥科技. All rights reserved.
//

#import "CollectionTableViewCell.h"

@implementation CollectionTableViewCell


- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self createSubview];
    }
    return self;
    
}


-(void)createSubview
{
    
    
    self.title = [[UILabel alloc]initWithFrame:CGRectMake(15 * WIDTH, 10 * HEIGHT, 370 *WIDTH, 30 * HEIGHT)];
    [self.contentView addSubview:self.title];
    [_title release];
   
   
    
    UIView *line = [[UIView alloc]initWithFrame:CGRectMake(5* WIDTH , 42 * HEIGHT, 370 * WIDTH, 0.5)];
    line.backgroundColor = [UIColor lightGrayColor];
    [self.contentView addSubview:line];
    [line release];
    
    
    
}

-(void)setCollect:(CollectModel *)collect
{
    if (_collect != collect) {
        [_collect release];
        _collect = [collect retain];
    }
    self.title.text = _collect.title;
    
    
}


-(void)setPlayer:(FMPlayerModel *)player
{
    if (_player != player) {
        [_player release];
        _player = [player retain];
    }
    self.title.text = _player.title;
}


- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
